﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MutFormStudio.test {
	public partial class Form2 : Form {
		
		public Form2() {
			InitializeComponent();
		}
		public Form2(ToXaml.Studio xml) {
			InitializeComponent();
			Studio std = new Studio();
			std.loadByXaml(xml, createControl);
			Size temp = std.Size;
			Controls.Add(std);
			std.Dock = DockStyle.Fill;
			Size = new Size(temp.Width+this.Width-std.Width, temp.Height + this.Height - std.Height);
		}
		private Control createControl(string create_str) {
			return new testControl(create_str, Color.Aquamarine);
		}
		

	}
}
